package xyz.hzxiao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import xyz.hzxiao.annotation.EncryptedColumn;
import xyz.hzxiao.annotation.EncryptedTable;

/**
 * 用户表实体类
 *
 * @author ：FuXx
 * @className : xyz.hzxiao.entity.UserEntity
 * @since ：2023-08-18
 */
@Getter
@Setter
@ToString
@TableName("user")
@EncryptedTable
public class UserEntity {

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 姓名
     */
    private String name;

    /**
     * 年龄
     */
    private Integer age;

    /**
     * 邮箱
     */
    @EncryptedColumn(prefix = 4, suffix = 5)
    private String email;

    /**
     * 手机号
     */
    @EncryptedColumn
    private String phone;

    /**
     * 身份证号码
     */
    @EncryptedColumn(prefix = 4, suffix = 4)
    private String idNumber;

}
